package com.mrtaohuan.action.admin;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import com.google.inject.Inject;
import com.mrtaohuan.render.HttpContext;
import com.mrtaohuan.render.freemarker.AbstractFreeMarkerRender;
import com.mrtaohuan.render.freemarker.FreeMarkerRenderer;
import com.mrtaohuan.render.freemarker.Templates;

@Path("/admin/settings")
@Produces(MediaType.TEXT_HTML)
public class Settings {
	@Inject
	HttpContext context;

	@Path("/general")
	@GET
	public String newPost() {
		final AbstractFreeMarkerRender renderer = new FreeMarkerRenderer();
		renderer.setTemplateName("admin/settings-general");
		renderer.setContext(context);
		return renderer.renderHtml();
	}
}
